package com.app.bimo.commonbusiness.util;

import android.content.Context;

import com.app.bimo.commonbusiness.base.BaseApplication;

public class PreferenceUtils extends BasePreference{

    private static PreferenceUtils preferenceUtils;
    private Context mContext;


    //是否首次打开阅读页
    private String FIRST_LAUNCH_READ = "first_launch_read";
    //是否首次打开详情页
    private String FIRST_LAUNCH_DETAIL = "first_launch_detail";
    //阅读页皮肤样式
    private String READ_SKIN = "READ_SKIN";




    private PreferenceUtils(Context context) {
        super(context);
        mContext = context;
    }


    public synchronized static PreferenceUtils getInstance() {
        if (null == preferenceUtils) {
            preferenceUtils = new PreferenceUtils(BaseApplication.getContext());
        }
        return preferenceUtils;
    }

    public void setFirstLaunchRead(boolean isFirst) {
        setBoolean(FIRST_LAUNCH_READ,isFirst);
    }

    public boolean getFirstlaunchRead() {
        return getBoolean(FIRST_LAUNCH_READ);
    }

    public void setFirstLaunchDetail(boolean isFirst) {
        setBoolean(FIRST_LAUNCH_DETAIL,isFirst);
    }

    public boolean getFirstlaunchDetail() {
        return getBoolean(FIRST_LAUNCH_DETAIL);
    }

    public void setReadSkin(String readSkin) {
        setString(READ_SKIN,readSkin);
    }

    public String getReadSkin() {
        return getString(READ_SKIN);
    }




}
